package com.whq.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.whq.dao.MessageMapper;
import com.whq.entity.Message;
import com.whq.service.MessageService;

@Service(value = "tdMessageService")
public class MessageServiceImpl implements MessageService {

    @Autowired
    private MessageMapper<Message>tdMessageMapper;
    
    @Override
    public Integer insertSelective(Message tdMessage) throws Exception {
           return this.tdMessageMapper.insertSelective(tdMessage);
        }

    @Override
    public Integer insertBatch(List<Message> tdMessage) throws Exception {
           return this.tdMessageMapper.insertBatch(tdMessage) ;
        }

    @Override
    public Integer deleteByPrimaryKey(Object id) {
            return this.tdMessageMapper.deleteByPrimaryKey(id);
    }

    public Integer deleteBatchByPrimaryKey(List<Object> ids) {
           return this.tdMessageMapper.deleteBatchByPrimaryKey(ids);
    }

    @Override
    public Integer updateByPrimaryKeySelective(Message tdMessage) {
           return this.tdMessageMapper.updateByPrimaryKeySelective(tdMessage);
    }

    @Override
    public Message findById(Object id) {
           return (Message) this.tdMessageMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Message> selectByCondition(Message tdMessage) {
           return (List<Message>) this.tdMessageMapper.selectByCondition(tdMessage);
    }

    @Override
    public Integer selectCountByCondition(Message tdMessage) {
           return  this.tdMessageMapper.selectCountByCondition(tdMessage);
    }

}
